﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <!--<script type="text/javascript" src="jquery/jquery-1.11.1.min.js"></script>-->
    <!--<link rel="stylesheet" href="jquery-ui/jquery-ui.min.css">
    <script type="text/javascript" src="jquery-ui/jquery-ui.min.js"></script>

    <link rel="stylesheet" href="bootstrap/bootstrap.min.css">
    <script type="text/javascript" src="bootstrap/bootstrap.min.js"></script>

    <link rel="stylesheet" href="css/framework-font.css">
    <link rel="stylesheet" href="css/framework-ui.css">

    <script type="text/javascript" src="knockout/knockout-latest.js"></script>
    <script type="text/javascript" src="knockout/knockout.mapping-latest.js"></script>
    <script type="text/javascript" src="js/kohelper.js"></script>

    <script type="text/javascript" src="validate/jquery.validate.min.js"></script>-->
    <!--<script type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>-->
    <!--<link rel="stylesheet" href="dialog/dialog.css">
    <script type="text/javascript" src="dialog/dialog.js"></script>
    <script type="text/javascript" src="js/ace.js"></script>-->


    <script src="jquery/jquery-2.1.1.min.js"></script>
    <script src="laydate/laydate.js"></script>
    <!--<script src="datepicker/WdatePicker.js"></script>-->
    <!--<script src="My97DatePicker/WdatePicker.js"></script>-->
</head>
<body>
    <input type="text" id="c" />
    <input type="button" value="btn" id="btn" />
    <br />
    <!--<input id="Birthday" name="Birthday" type="text" class="form-control input-wdatepicker Wdate" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" data-bind="dateString:Model().Birthday" />-->
    <!--<input type="text" id="cc" class="Wdate" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" />-->
    <script>
        $("#btn").click(function () {
            //$("#c").val("2017-09-16");
            $("#c")[0].value = "2017-09-16";
        });
        //laydate 不触发 change 事件？？
        $("#c").change(function () {
            alert(this.value);
        });

        //$("#cc")[0].onchange = function () {
        //    alert(1);
        //}

        laydate.render({
            elem: '#c'
            , done: function (value, date, endDate) {
                alert(111);
                $("#c").change();
            }
        });
    </script>
</body>
</html>